package com.amit.Basic_Simple_Program;

import java.util.Scanner;

public class Swapping_Without_Third_Varaiable {

	public static void main(String[] args) {
		
		System.out.println("Enter two number for swapping");
		Scanner sc=new Scanner(System.in);
		
		int a=sc.nextInt();
		int b=sc.nextInt();
		
		System.out.println("Before swapping the numbers are"+" "+a +" "+b);
		
		
		a=a+b;
		b=a-b;
		a=a-b;
		
		System.out.println("After swapping the numbers are"+" "+a +" "+b);	
		
		
		
	}

}
